package com.gite.nouette.admin.implementation.view.command;

import com.gite.nouette.admin.contract.controller.command.ICCommandRemoveModule;
import com.gite.nouette.admin.contract.view.command.IVCommandRemoveModule;
import com.gite.nouette.admin.implementation.view.util.ViewUtil;
import com.smartgwt.client.widgets.ImgButton;
import com.smartgwt.client.widgets.events.ClickHandler;

public class VCommandRemoveModuleImpl extends ImgButton implements
		IVCommandRemoveModule {
	private ICCommandRemoveModule c;

	public VCommandRemoveModuleImpl() {
		setWidth(15);
		setHeight(15);
		setShowRollOver(false);
		setShowDown(false);
		setShowFocused(false);
		setShowDisabled(false);
		setSrc("[SKIN]/headerIcons/close.png");

		addClickHandler(createClickHandler());
	}

	@Override
	public ICCommandRemoveModule getC() {
		return this.c;
	}

	@Override
	public void setC(ICCommandRemoveModule c) {
		this.c = c;
	}

	@Override
	public boolean isActive() {
		return ViewUtil.isActive(this);
	}

	@Override
	public void active() {
		ViewUtil.active(this);
	}

	@Override
	public void desactive() {
		ViewUtil.desactive(this);
	}

	@Override
	public String getName() {
		return ViewUtil.getName(this);
	}

	@Override
	public void setName(String name) {
		ViewUtil.setName(name, this);
	}

	protected ClickHandler createClickHandler() {
		return ViewUtil.createClickHandler(this);
	}
}
